package com.mark.util.resmessage;

import java.io.Serializable;

public class JsonResult implements Serializable {
	private static final long serialVersionUID = 7834627266188446724L;
	/**
	 * 操作结果码
	 */
	private Integer errCode;
	/**
	 * 提示信息
	 */
	private String errMsg;
	/**
	 * 结果标识
	 */
	private boolean success;
	/**
	 * 返回数据
	 */
	private Object data;

	public JsonResult() {
		this.errCode = 1;
		this.errMsg = "操作失败！";
		this.data = null;
		this.success = false;
	}

	public JsonResult(Integer errCode, String errMsg, boolean success,Object data) {
		this.errCode = errCode;
		this.errMsg = errMsg;
		this.success = success;
		this.data = data;
	}

	public Integer getErrCode() {
		return errCode;
	}

	public void setErrCode(Integer errCode) {
		this.errCode = errCode;
	}

	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
